home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / Monitor.i < prev    next >
Encoding:
Text File  |  1994-07-25  |  4.2 KB  |  164 lines

  1. { Monitor.i }
  2.  
  3. {$I   "Include:Exec/Semaphores.i"}
  4. {$I   "Include:Graphics/GFX.i"}
  5. {$I   "Include:Hardware/Custom.i"}
  6. {$I   "Include:Graphics/GFXNodes.i"}
  7.  
  8. Type
  9.  AnalogSignalInterval = Record
  10.   asi_Start,
  11.   asi_Stop  : Short;
  12.  END;
  13.  AnalogSignalIntervalPtr = ^AnalogSignalInterval;
  14.  
  15.  SpecialMonitor = Record
  16.   spm_Node      : ExtendedNodePtr;
  17.   spm_Flags     : Short;
  18.   do_monitor,
  19.   reserved1,
  20.   reserved2,
  21.   reserved3     : Address;
  22.   hblank,
  23.   vblank,
  24.   hsync,
  25.   vsync : AnalogSignalInterval;
  26.  END;
  27.  SpecialMonitorPtr = ^SpecialMonitor;
  28.  
  29.  
  30.  MonitorSpec = Record
  31.     ms_Node     : ExtendedNodePtr;
  32.     ms_Flags    : Short;
  33.     ratioh,
  34.     ratiov      : Integer;
  35.     total_rows,
  36.     total_colorclocks,
  37.     DeniseMaxDisplayColumn,
  38.     BeamCon0,
  39.     min_row     : Short;
  40.     ms_Special  : SpecialMonitorPtr;
  41.     ms_OpenCount : Short;
  42.     ms_transform,
  43.     ms_translate,
  44.     ms_scale    : Address;
  45.     ms_xoffset,
  46.     ms_yoffset  : Short;
  47.     ms_LegalView : Rectangle;
  48.     ms_maxoscan,       { maximum legal overscan }
  49.     ms_videoscan  : Address;      { video display overscan }
  50.     DeniseMinDisplayColumn : Short;
  51.     DisplayCompatible      : Integer;
  52.     DisplayInfoDataBase    : List;
  53.     DisplayInfoDataBaseSemaphore : SignalSemaphorePtr;
  54.     ms_reserved00,
  55.     ms_reserved01 : Integer;
  56.  END;
  57.  MonitorSpecPtr = ^MonitorSpec;
  58.  
  59. const
  60.   TO_MONITOR            =  0;
  61.   FROM_MONITOR          =  1;
  62.   STANDARD_XOFFSET      =  9;
  63.   STANDARD_YOFFSET      =  0;
  64.  
  65.   MSB_REQUEST_NTSC      =  0;
  66.   MSB_REQUEST_PAL       =  1;
  67.   MSB_REQUEST_SPECIAL   =  2;
  68.   MSB_REQUEST_A2024     =  3;
  69.   MSB_DOUBLE_SPRITES    =  4;
  70.   MSF_REQUEST_NTSC      =  1;
  71.   MSF_REQUEST_PAL       =  2;
  72.   MSF_REQUEST_SPECIAL   =  4;
  73.   MSF_REQUEST_A2024     =  8;
  74.   MSF_DOUBLE_SPRITES    =  16;
  75.  
  76.  
  77. { obsolete, v37 compatible definitions follow }
  78.   REQUEST_NTSC          =  1;
  79.   REQUEST_PAL           =  2;
  80.   REQUEST_SPECIAL       =  4;
  81.   REQUEST_A2024         =  8;
  82.  
  83.   DEFAULT_MONITOR_NAME  =  "default.monitor";
  84.   NTSC_MONITOR_NAME     =  "ntsc.monitor";
  85.   PAL_MONITOR_NAME      =  "pal.monitor";
  86.   STANDARD_MONITOR_MASK =  ( REQUEST_NTSC OR REQUEST_PAL ) ;
  87.  
  88.   STANDARD_NTSC_ROWS    =  262;
  89.   STANDARD_PAL_ROWS     =  312;
  90.   STANDARD_COLORCLOCKS  =  226;
  91.   STANDARD_DENISE_MAX   =  455;
  92.   STANDARD_DENISE_MIN   =  93 ;
  93.   STANDARD_NTSC_BEAMCON =  $0000;
  94.   STANDARD_PAL_BEAMCON  =  DISPLAYPAL ;
  95.  
  96.   SPECIAL_BEAMCON       = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE);
  97.  
  98.   MIN_NTSC_ROW    = 21   ;
  99.   MIN_PAL_ROW     = 29   ;
  100.   STANDARD_VIEW_X = $81  ;
  101.   STANDARD_VIEW_Y = $2C  ;
  102.   STANDARD_HBSTRT = $06  ;
  103.   STANDARD_HSSTRT = $0B  ;
  104.   STANDARD_HSSTOP = $1C  ;
  105.   STANDARD_HBSTOP = $2C  ;
  106.   STANDARD_VBSTRT = $0122;
  107.   STANDARD_VSSTRT = $02A6;
  108.   STANDARD_VSSTOP = $03AA;
  109.   STANDARD_VBSTOP = $1066;
  110.  
  111.   VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2);
  112.   VGA_TOTAL_ROWS  = (STANDARD_NTSC_ROWS*2);
  113.   VGA_DENISE_MIN  = 59   ;
  114.   MIN_VGA_ROW     = 29   ;
  115.   VGA_HBSTRT      = $08  ;
  116.   VGA_HSSTRT      = $0E  ;
  117.   VGA_HSSTOP      = $1C  ;
  118.   VGA_HBSTOP      = $1E  ;
  119.   VGA_VBSTRT      = $0000;
  120.   VGA_VSSTRT      = $0153;
  121.   VGA_VSSTOP      = $0235;
  122.   VGA_VBSTOP      = $0CCD;
  123.  
  124.   VGA_MONITOR_NAME      =  "vga.monitor";
  125.  
  126. { NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
  127.  * implemented.
  128.  }
  129.   VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ;
  130.   VGA70_TOTAL_ROWS  = 449;
  131.   VGA70_DENISE_MIN  = 59;
  132.   MIN_VGA70_ROW     = 35   ;
  133.   VGA70_HBSTRT      = $08  ;
  134.   VGA70_HSSTRT      = $0E  ;
  135.   VGA70_HSSTOP      = $1C  ;
  136.   VGA70_HBSTOP      = $1E  ;
  137.   VGA70_VBSTRT      = $0000;
  138.   VGA70_VSSTRT      = $02A6;
  139.   VGA70_VSSTOP      = $0388;
  140.   VGA70_VBSTOP      = $0F73;
  141.  
  142.   VGA70_BEAMCON     = (SPECIAL_BEAMCON XOR VSYNCTRUE);
  143.   VGA70_MONITOR_NAME=      "vga70.monitor";
  144.  
  145.   BROADCAST_HBSTRT  =      $01  ;
  146.   BROADCAST_HSSTRT  =      $06  ;
  147.   BROADCAST_HSSTOP  =      $17  ;
  148.   BROADCAST_HBSTOP  =      $27  ;
  149.   BROADCAST_VBSTRT  =      $0000;
  150.   BROADCAST_VSSTRT  =      $02A6;
  151.   BROADCAST_VSSTOP  =      $054C;
  152.   BROADCAST_VBSTOP  =      $1C40;
  153.   BROADCAST_BEAMCON =      ( LOLDIS OR CSBLANK );
  154.   RATIO_FIXEDPART   =      4;
  155.   RATIO_UNITY       =      16;
  156.  
  157. FUNCTION CloseMonitor(m : MonitorSpecPtr) : Integer;
  158.     External;
  159.  
  160. FUNCTION OpenMonitor(name : String; ModeID : Integer) : MonitorSpecPtr;
  161.     External;
  162.  
  163.  
  164.